package com.ctg.behavior.common.addictions;

import java.util.ArrayList;
import java.util.List;

import com.ctg.behavior.common.calc.CtCalcCommonBody;
import com.ctg.behavior.common.calc.CtCalcFilter;
import com.ctg.behavior.common.calc.CtCalcMeasure;
import com.ctg.behavior.common.consts.CtCalcConsts;

import lombok.Data;
import lombok.EqualsAndHashCode;

@EqualsAndHashCode(callSuper = false)
@Data
public class CtAddictionsCalcBody extends CtCalcCommonBody {

///*
//{
//	"eventId": "_AppStart",
//	"filter": {
//		"conditions": [ ]
//	},
//	"fromDate": "2021-07-05",
//	"toDate": "2021-07-08",
//	"measureType": "times",
//	"samplingFactor": 64,
//	"unit": "day",
//	"subjectId": "user_id",
//	"userFilter": {
//		"conditions": [ ]
//	},
//	"rollupDate": false,
//	"byField": "event._Anything._lib",
//	"subTaskType": "addictions",
//	"requestId": "1625736618635:149634",
//	"bookmarkId": "10000"
//}
//*/
//	
	private String eventId;

//  已移入CtCalcCommonBody对象中
//	// 事件满足条件
//	private CtCalcFilter filter = new CtCalcFilter();
	// 用户进行的事件及指定的事件计算维度
	private CtCalcMeasure measure = new CtCalcMeasure();
	// 次数：times, 天数/小时数：period
	private String measureType = CtCalcConsts.MEASURE_TYPE_TIMES;
	//
	private Integer samplingFactor = 64;
//  // 移到CtCalcCommonBody类中
//	// 按用户维度统计
//	private String subjectId = "user_id";
	// 事件满足条件
	private CtCalcFilter userFilter = new CtCalcFilter();
	// 计算结果是否累计(按时间累加)
	private Boolean rollupDate = false;
	// 分组字段
	private String byField;
	// 分布次数区间定义，格式：["50", "100", "120"]
	private List<String> resultBucketParam = new ArrayList<>();

}
